<?php

namespace App\Http\Requests\Api;

use Illuminate\Contracts\Validation\Validator;
use Illuminate\Http\Exceptions\HttpResponseException;

class CommentRequest extends FormRequest
{
    public function rules()
    {

        return [
            'activity_id' => ['required', 'exists:activity,id'],

            'content' => 'required',

           ];
    }

    public function messages()
    {
        return [
            'activity_id.required'=>'活动不能为空',
            'activity_id.unique' => '活动不存在',
            'content.required' => '评论不能为空',

        ];
    }


}
